// @ts-ignore
/* eslint-disable */
import request from 'umi-request';

const token = localStorage.getItem("token");


import {PORT} from '../requestPath/index'
/** get menu */
export async function userMenuList(
  params :{
    menuLists:string
  }
) {
  return request<{
    data: API.Routes;
  }>(PORT+'/api/jurisdiction/menu', {
    method: 'POST',
    headers:{
      "Authorization":`${localStorage.getItem("token")}`,
      "TimeSystemCurrent":`${new Date().getTime()}`
    },
    data:params
  });
}

/**
 * 
 * @returns get path
 */
 export async function userMenuListPath(
  params :{
    menuLists:string
  }
) {
  return request<{
    data: string[];
  }>(PORT+'/api/jurisdiction/menu/path', {
    method: 'POST',
    headers:{
      "Authorization":`${localStorage.getItem("token")}`,
      "TimeSystemCurrent":`${new Date().getTime()}`
    },
    data:params
  });
}

//http://192.168.1.76:9999/api/jurisdiction/menu/list

/** get menu */
export async function userJurisdictionMenuList() {
  return request<{
    data: API.JurisdictionMenu;
  }>(PORT+'/api/jurisdiction/menu/list', {
    method: 'GET',
    headers:{
      "Authorization":`${localStorage.getItem("token")}`,
      "TimeSystemCurrent":`${new Date().getTime()}`
    },
  });
}